import com.myc.UserMapper;

import java.lang.reflect.Proxy;

/**
 * @Classname InvokeTest
 * @Description
 * @Date 2020-09-03 19:27
 * @Created by myc
 */
public class InvokeTest {
    public static void main(String[] args) {
        Hello hello = new HelloImpl();
        MyInvoke invoke = new MyInvoke(hello);
        Hello hello1 = (Hello) Proxy.newProxyInstance(hello.getClass().getClassLoader(),hello.getClass().getInterfaces(),invoke);
        hello1.sayHello();
    }
}
